import request from '@/utils/request.js'


export default {

  //医院设置列表方法
  getHospSetList(current,limit,searchObj) {
    return request({
      url: `/admin/hosp/hospitalSet/findPageHospSet/${current}/${limit}`,
      method: 'POST',
      data: searchObj   //使用json方式传递
    })
  },

  //删除医院设置
  deleteHospSet(id) {
    return request({
      url: `/admin/hosp/hospitalSet/deleteHospSet/${id}`,
      method: 'DELETE'
    })
  },

  //批量删除
  batchRemoveHospSet(idList) {
    return request({
      url: "/admin/hosp/hospitalSet/batchRemove/",
      method: 'DELETE',
      data: idList
    })
  },

  //锁定与取消锁定
  lockHospSet(id,status) {
    return request({
      url: `/admin/hosp/hospitalSet/lockHospitalSet/${id}/${status}`,
      method: "PUT"
    })
  },

  //添加医院设置
  saveHospSetInfo(hospitalSet) {
    return request({
      url: "/admin/hosp/hospitalSet/saveHospitalSet",
      method: "POST",
      data: hospitalSet
    })
  },

  //编辑医院设置，根据id查询
  getHospSetInfo(id) {
    return request({
      url: `/admin/hosp/hospitalSet/getHospSet/${id}`,
      method: "GET"
    })
  },

  //修改医院设置
  updateHospSetInfo(hospitalSet) {
    return request({
      url: "/admin/hosp/hospitalSet/updateHospitalSet",
      method: "PUT",
      data: hospitalSet
    })
  }

}
